//
//  RegestSecondStepViewController.m
//  DefendHealth
//
//  Created by 吾诺翰卓003 on 17/2/22.
//  Copyright © 2017年 iMacOne. All rights reserved.
//

#import "RegestSecondStepViewController.h"
#import "EditInfoViewController.h"
@interface RegestSecondStepViewController ()

@end

@implementation RegestSecondStepViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.TitleNav.text = @"密码设置";
    self.leftbutton.hidden = YES;
    
    UIButton *addFriendsBtn = [[UIButton alloc] initWithFrame:CGRectMake(10, 23, [ToolUtil autoWidth:@"返回" width:500 height:13 num:13], 40)];
    [addFriendsBtn setTitle:@"返回" forState:UIControlStateNormal];
    [addFriendsBtn addTarget:self action:@selector(leftEvents) forControlEvents:UIControlEventTouchUpInside];
    addFriendsBtn.titleLabel.font = FONT(13);
    [addFriendsBtn setTitleColor:[ImageUtil colorWithRgb:0x333333] forState:0];
    [self.view addSubview:addFriendsBtn];
    [self addView];
    self.view.backgroundColor = [UIColor whiteColor];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)addView{
    
    UIImageView * nameImg = [ReduceCode creatImageVeiwWithFrame:CGRectMake(10, 64+24, 27, 27) imageName:@"" isCorner:YES];
    nameImg.backgroundColor = [UIColor grayColor];
    [self.view addSubview:nameImg];
    
    
    UITextField * userName  = [ReduceCode creatTextFieldWithFrame:CGRectMake(kMaxX(nameImg.frame)+12, 0, kScreenWidth-kMaxX(nameImg.frame)*2-20, 16) PlaceHold:@"请输入账号密码" PlaceHoldColor:UIColorFromRGB(0x999999) btnTitleFont:16 btnBackgroundColor:nil KeyboardType:UIKeyboardTypeDefault isCorner:NO];
    userName.centerY = nameImg.centerY;
    [self.view addSubview:userName];
    
    
    
    
    
    UIView * loginLin  = [[UIView alloc]initWithFrame:CGRectMake(10, kMaxY(nameImg.frame)+17, kScreenWidth-20, 1)];
    loginLin.backgroundColor = UIColorFromRGB(0xbcbcbc);
    //    loginLin.centerX = loginImg.centerX;
    [self.view addSubview:loginLin];
    
    
    
    
    UIImageView * passImg = [ReduceCode creatImageVeiwWithFrame:CGRectMake(10, kMaxY(nameImg.frame)+34, 27, 27) imageName:@"" isCorner:YES];
    passImg.backgroundColor = [UIColor grayColor];
    
    [self.view addSubview:passImg];
    
    UITextField * userPass  = [ReduceCode creatTextFieldWithFrame:CGRectMake(kMaxX(passImg.frame)+12, 0, kScreenWidth-kMaxX(nameImg.frame)*2-20, 16) PlaceHold:@"再次输入账号密码" PlaceHoldColor:UIColorFromRGB(0x999999) btnTitleFont:16 btnBackgroundColor:nil KeyboardType:UIKeyboardTypeDefault isCorner:NO];
    userPass.centerY = passImg.centerY;
    [self.view addSubview:userPass];
    
   
    
    
    UIButton * loginBtn = [UIButton creatBtnWithFrame:CGRectMake(50, kMaxY(passImg.frame)+50, kScreenWidth-100, 40) btnTitle:@"完成注册" btnTitleColor:kWhiteColor btnTitleFont:18 btnTagPrice:0 btnSetImage:nil btnBackgroundColor:UIColorFromRGB(0x7b7c7c) isCorner:YES action:^(UIButton *button) {
        EditInfoViewController *stVC = [EditInfoViewController new];
        stVC.hidesBottomBarWhenPushed = YES;
        [self.navigationController pushViewController:stVC animated:YES];
        
    }];
    loginBtn.layer.cornerRadius = 20;
    
    [self.view addSubview:loginBtn];
}
@end
